package p270jp.pxv.android.view;

import android.content.Context;
import android.util.AttributeSet;
import android.view.View;
import android.view.ViewPropertyAnimator;
import android.widget.FrameLayout;
import p270jp.pxv.android.R;
import p325m0.MutabilityOwnership;

/* compiled from: BottomGiftingAnimationView.kt */
/* renamed from: jp.pxv.android.view.BottomGiftingAnimationView */
/* loaded from: classes2.dex */
public final class BottomGiftingAnimationView extends FrameLayout {

    /* renamed from: a */
    public int f19457a;

    /* renamed from: b */
    public int f19458b;

    /* renamed from: c */
    public int f19459c;

    /* renamed from: d */
    public final int f19460d = getResources().getDimensionPixelOffset(R.dimen.others_gifting_animation_width);

    /* renamed from: e */
    public final int f19461e = getResources().getDimensionPixelOffset(R.dimen.others_gifting_animation_height);

    /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
    public BottomGiftingAnimationView(Context context, AttributeSet attributeSet) {
        super(context, attributeSet);
        MutabilityOwnership.m3745m(context, "context");
        if (!isInEditMode()) {
            this.f19457a = getResources().getDimensionPixelOffset(R.dimen.live_animation_transition_x_degree);
            this.f19458b = getResources().getDimensionPixelOffset(R.dimen.live_animation_transition_x_margin);
            this.f19459c = getResources().getDimensionPixelOffset(R.dimen.live_animation_transition_y_degree);
        }
    }

    @Override // android.view.View, android.view.ViewGroup
    public void onDetachedFromWindow() {
        ViewPropertyAnimator animate;
        int childCount = getChildCount();
        if (childCount > 0) {
            int i = 0;
            while (true) {
                int i2 = i + 1;
                View childAt = getChildAt(i);
                if (!(childAt == null || (animate = childAt.animate()) == null)) {
                    animate.cancel();
                }
                if (i2 >= childCount) {
                    break;
                }
                i = i2;
            }
        }
        super.onDetachedFromWindow();
    }
}
